<template>
  <div>
    <router-view></router-view>
    <van-tabbar v-model="active" active-color="#ee0a24" inactive-color="#000" @change="onChange" route>
      <van-tabbar-item icon="home-o" to="/first">首页</van-tabbar-item>
      <van-tabbar-item icon="shopping-cart-o" to="/user/cart">洗衣篮</van-tabbar-item>
      <van-tabbar-item icon="todo-list-o" badge="5" to="/user/orderlies">订单</van-tabbar-item>
      <van-tabbar-item icon="friends-o" dot to="/user/personal">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
  import { Notify } from 'vant';
export default {
  data() {
    return {
      active: 0,
      userName:'登录',
      list: [
        {
          photo:
            "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fqcloud.dpfile.com%2Fpc%2F-YkI-xaSQehJoD3yvlcqB1QpGZHkFKdxsfl_bHVhxvkAYpBnpZyeK1-EVSeBbyfTNZvK3RMEnSZusP-oHmeixOpEuctC7NDQ04iV_zcg7BUYPeq-iX-oD-RLc_uA0GHhp6cjSpPcu-UE8TQHZIi94A.jpg&refer=http%3A%2F%2Fqcloud.dpfile.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649645439&t=960ea52f36867f6e997866ccbb319894",
          text: "兵马俑",
        },
      ],
    };
  },
  methods:{
    onChange(index) {
      Notify({ type: 'primary', message: '切换'});
    },
  }
};
</script>

